package cn.hackcloud.designpattern.memento;

public class Client {

	public static void main(String[] args) {
		Originator originator = new Originator();
		CareTaker careTaker = new CareTaker();

		originator.setState("状态是：1 攻击力100");
		careTaker.add(originator.saveMemento());

		originator.setState("状态是：2 攻击力80");
		careTaker.add(originator.saveMemento());

		originator.setState("状态是：3 攻击力50");
		careTaker.add(originator.saveMemento());

		System.out.println("当前的状态是：=" + originator.getState());
		
		originator.getStateMemento(careTaker.get(1));
		System.out.println("当前的状态是：=" + originator.getState());
		

	}

}
